package com.yyg.usecase.springbootwebdemo.service.starter_demo;

import com.yyg.usecase.AuthService;
import org.springframework.stereotype.Component;

@Component
public class AuthServiceWrap {

    private AuthService authService;

    public AuthServiceWrap(AuthService authService) {
        this.authService = authService;
    }

    public String isAdmin(String userId) {
        String result = null;
        // 调用AuthService的isAdmin方法
        if (authService.isAdmin(userId)){
            result = "管理员";
        } else {
            result = "非管理员";
        }
        return result;
    }

}
